package com.zh.note.demo.collection;

import java.util.Deque;
import java.util.LinkedList;
import java.util.Queue;

/**
 * @Author: zhanghuan
 * @date: 2023/6/29 22:34
 * @description: create it
 */
public class QueueStackDemo {
    public static void main(String[] args) {
        /**
         * 队列
         */
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.poll();
        /**
         * 栈
         */
        Deque<Integer> stack = new LinkedList<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.pop();
    }
}
